From: Jens Frank Date: Tue, 18 May 2010 20:35:25 +0000 (+0000) Subject: Use ID instead of (namespace,title) for the update statement, fix reporting X-Git-Tag: 1.31.0-rc.0~36798 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=f6efb8d23e44efa50c53d5a178c3b3946d881d4b;p=lhc%2Fweb%2Fwiklou.git Use ID instead of (namespace,title) for the update statement, fix reporting --- diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index dee2d28122..5cb331dee4 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -200,7 +200,8 @@ class NamespaceConflictChecker extends Maintenance { $sql = "SELECT {$page}_id AS id, {$page}_title AS oldtitle, $encNamespace + {$page}_namespace AS namespace, - $titleSql AS title + $titleSql AS title, + {$page}_namespace AS oldnamespace FROM {$table} WHERE ( {$page}_namespace=0 OR {$page}_namespace=1 ) AND {$page}_title " . $this->db->buildLike( $name . ':', $this->db->anyString() ); @@ -224,15 +225,17 @@ class NamespaceConflictChecker extends Maintenance { if( is_null($newTitle) || !$newTitle->canExist() ) { // Title is also an illegal title... // For the moment we'll let these slide to cleanupTitles or whoever. - $this->output( sprintf( "... %d (0,\"%s\")\n", + $this->output( sprintf( "... %d (%d,\"%s\")\n", $row->id, + $row->oldnamespace, $row->oldtitle ) ); $this->output( "... *** cannot resolve automatically; illegal title ***\n" ); return false; } - $this->output( sprintf( "... %d (0,\"%s\") -> (%d,\"%s\") [[%s]]\n", + $this->output( sprintf( "... %d (%d,\"%s\") -> (%d,\"%s\") [[%s]]\n", $row->id, + $row->oldnamespace, $row->oldtitle, $newTitle->getNamespace(), $newTitle->getDBkey(), @@ -291,8 +294,9 @@ class NamespaceConflictChecker extends Maintenance { "{$prefix}_title" => $newTitle->getDBkey(), ), array( - "{$prefix}_namespace" => 0, - "{$prefix}_title" => $row->oldtitle, + // "{$prefix}_namespace" => 0, + // "{$prefix}_title" => $row->oldtitle, + "{$prefix}_id" => $row->id, ), __METHOD__ ); $this->output( "ok.\n" );